package com.joysuch.wwyt.patrol.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.joysuch.wwyt.bp.bean.BpDeviceFacilityInspectRecordBean;
import com.joysuch.wwyt.patrol.entity.PatrolCheckPoint;
import com.joysuch.wwyt.patrol.entity.PatrolRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.joysuch.wwyt.patrol.entity.bean.StatPlanTitleSearchBean;
import com.joysuch.wwyt.patrol.entity.dto.SimplePointRecordDto;
import com.joysuch.wwyt.patrol.entity.dto.SimpleRecordResultDto;
import com.joysuch.wwyt.patrol.entity.vo.WebTaskRecordPointVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import javax.swing.text.StyledEditorKit;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author heqifeng
 * @since 2022-03-03
 */
@Repository
public interface PatrolRecordMapper extends BaseMapper<PatrolRecord> {

    List<PatrolCheckPoint> selectUncheckPoint(Long taskId);

    List<SimplePointRecordDto> selectSimplePointRecord(Long taskId);

    List<WebTaskRecordPointVo> selectPointRecord(Long taskId);

    WebTaskRecordPointVo selectPointRecordByRecordId(Long recordId);

    /**
     * 包含智能巡检和点检管理的检查记录
     * @param page
     * @param deviceId
     * @return
     */
    Page<BpDeviceFacilityInspectRecordBean> getRecordByDeviceId(Page page, Long deviceId);

    List<SimpleRecordResultDto> selectSimpleRecordByPlanIds(@Param("list") List<Long> list,@Param("searchBean")  StatPlanTitleSearchBean searchBean);
}
